﻿using Pay.TO;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.DTO {
    public class token_bazaar_product_base_dto {
        [Required]
        public long id { get; set; }
        /// <summary>
        /// 用户id
        /// </summary>
        public long merchant_id { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>
        [Required(ErrorMessage = "请填写商品名称")]
        public string product_name { get; set; }
        /// <summary>
        /// 商品描述
        /// </summary>
        [Required(ErrorMessage = "请填写商品描述")]
        public string prodcut_desc { get; set; }
        /// <summary>
        /// 商品库存
        /// </summary>
        //[Required(ErrorMessage = "请填写商品库存")]
        public int num { get; set; } = 1;
        /// <summary>
        /// 图片
        /// </summary>
        [Required(ErrorMessage = "请上传商品图片")]
        public List<string> imgs { get; set; }
        /// <summary>
        /// 市场价格
        /// </summary>
        //[Required(ErrorMessage = "请填写价格")]
        public decimal market_price { get; set; }
        /// <summary>
        /// 分类
        /// </summary>
        [Required(ErrorMessage = "请选择分类")]
        public long category_id { get; set; }
        /// <summary>
        /// 交付方式 0 包邮 1 到付
        /// </summary>
        [Required(ErrorMessage = "请选择交付方式")]
        public int delivering { get; set; }
        /// <summary>
        /// (红钻)价格
        /// </summary>
        public decimal price { get; set; }
    }
    /// <summary>
    /// 集市商品 app
    /// </summary>
    public class token_bazaar_product_dto : token_bazaar_product_base_dto {
        /// <summary>
        /// 主图
        /// </summary>
        public string main_img { get; set; }
        /// <summary>
        /// 分类名称
        /// </summary>
        public string catagory_name { get; set; }

        /// <summary>
        /// 是否推荐
        /// </summary>
        public bool is_recommend { get; set; }
        /// <summary>
        /// 集市商品状态 0待审核 1上架中 2已下架 3已删除 4 已交易
        /// </summary>
        public EBazaarProductStatus status { get; set; }
        /// <summary>
        /// 商品状态 描述
        /// </summary>
        public string status_desc { get; set; }
        /// <summary>
        /// 用户名称
        /// </summary>
        public string merchant_name { get; set; }
        /// <summary>
        /// 用户账号
        /// </summary>
        public string merchant_mobile { get; set; }
        /// <summary>
        /// 用户头像
        /// </summary>
        public string merchant_photo { get; set; }
        /// <summary>
        /// 是否已删除
        /// </summary>
        public bool is_del { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime create_time { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime update_time { get; set; }
    }

}
